package cn.bdqn.web;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author 梁非凡
 * @date 2018/8/15 10:55
 */
@WebServlet("/delteuser")
public class DelteuserServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        Users users = (Users) request.getSession().getAttribute("users");
//        Usersservice usersservice=new UsersserviceImp();
//        boolean b = usersservice.logout(users);
        request.getSession().removeAttribute("users");
       response.sendRedirect(request.getContextPath()+"index.jsp");
    }
}
